<?php 
/**
 * @version 0.8.3 2010-10-07
 * @package Joomla
 * @subpackage LeagueResults
 * @copyright (C)  2008, 2009, 2010 Henryk Drozd
 * @license GNU/GPL, see LICENSE.php
 * LeagueResults is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.

 * LeagueResults is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.application.component.controller' );
class lrController extends JController
{
	var $debug = true;
	function __construct()
	{
		parent::__construct();

	}

	/**
	 * Display the view
	 */
	function display()
	{
	$user 		= & JFactory::getUser();
	$document	= & JFactory::getDocument();
	
	$document->addStyleSheet('components/com_lr/assets/css/lr_backend.css');

	$view	= JRequest::getVar( 'view', '', '', 'string', JREQUEST_ALLOWRAW );
	
	JSubMenuHelper::addEntry( JText::_( 'COMPONENT NAME' ), 'index.php?option=com_lr',
		($view == ''));
	JSubMenuHelper::addEntry( JText::_( 'SEASONS' ), 'index.php?option=com_lr&view=seasons',
		($view == 'seasons'));
	JSubMenuHelper::addEntry( JText::_( 'CLUBS' ), 'index.php?option=com_lr&view=clubs',
		($view == 'clubs'));
	JSubMenuHelper::addEntry( JText::_( 'TEAMS' ), 'index.php?option=com_lr&view=teams',
		($view == 'teams'));
	JSubMenuHelper::addEntry( JText::_( 'PLAYERS' ), 'index.php?option=com_lr&view=players',
		($view == 'players'));
	JSubMenuHelper::addEntry( JText::_( 'TEAMPLAYERS' ), 'index.php?option=com_lr&view=teamplayers',
		($view == 'teamplayers'));
	JSubMenuHelper::addEntry( JText::_( 'TABLES' ), 'index.php?option=com_lr&view=tableheaders',
		($view == 'tableheaders'));
	JSubMenuHelper::addEntry( JText::_( 'TABLECONTENTS' ), 'index.php?option=com_lr&view=tablecontents',
		($view == 'tablecontents'));
	JSubMenuHelper::addEntry( JText::_( 'FIXTURES-RESULTS' ), 'index.php?option=com_lr&view=fixtures',
		($view == 'fixtures'));
		if ($user->get('gid') > 24) {
		JSubMenuHelper::addEntry( JText::_( 'TOOLS' ), 'index.php?option=com_lr&view=lr_tools');
		}
	JSubMenuHelper::addEntry( JText::_( 'CHANGELOG.TXT' ), 'index.php?option=com_lr&view=changelog',
		($view == 'changelog'));
		
	parent::display();

	}


}

